package com.logictech.lims.dao.impl;

import java.util.List;

import org.jeecgframework.p3.core.utils.common.PageQuery;
import org.jeecgframework.p3.core.utils.common.PageQueryWrapper;
import org.jeecgframework.p3.core.utils.persistence.mybatis.GenericDaoDefault;
import org.springframework.stereotype.Repository;
import com.logictech.lims.dao.SourcingDao;
import com.logictech.lims.entity.Sourcing;

/**
 * 描述：</b>SourcingDaoImpl<br>
 * @author：guoqi
 * @since：2017年04月14日 13时18分21秒 星期五 
 * @version:1.0
 */
@Repository("sourcingDao")
public class SourcingDaoImpl extends GenericDaoDefault<Sourcing> implements SourcingDao{

	@Override
	public Integer count(PageQuery<Sourcing> pageQuery) {
		return (Integer) super.queryOne("count",pageQuery);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Sourcing> queryPageList(
			PageQuery<Sourcing> pageQuery,Integer itemCount) {
		PageQueryWrapper<Sourcing> wrapper = new PageQueryWrapper<Sourcing>(pageQuery.getPageNo(), pageQuery.getPageSize(),itemCount, pageQuery.getQuery());
		return (List<Sourcing>)super.query("queryPageList",wrapper);
	}

	@SuppressWarnings("unchecked")
	@Override
	public List<Sourcing> queryList(PageQuery<Sourcing> pageQuery) {
		return (List<Sourcing>)super.query("queryList",pageQuery);
	}

}

